#include "usart.h"
#include "led.h"

uint8_t uart_rx_buffer;

void dian_Init(void)
{
    HAL_UART_Receive_IT(&huart1, &uart_rx_buffer, 1);
}

void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
    if(huart->Instance == USART1)
    {
        LED_Control(uart_rx_buffer); 
        HAL_UART_Receive_IT(huart, &uart_rx_buffer, 1); 
    }
}
